package com.motorwaymanage.beans;
/**
 * 设备位置
 */
public class LocationInfo {
	private int lid;
	private String sname;
	private String laddr;
	private int lstatus;//默认正常1    0是停用    2是维护
	
	@Override
	public String toString() {
		return "LocationInfo [lid=" + lid + ", sname=" + sname + ", laddr=" + laddr + ", lstatus=" + lstatus + "]";
	}

	public int getLid() {
		return lid;
	}

	public void setLid(int lid) {
		this.lid = lid;
	}

	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public String getLaddr() {
		return laddr;
	}

	public void setLaddr(String laddr) {
		this.laddr = laddr;
	}

	public int getLstatus() {
		return lstatus;
	}

	public void setLstatus(int lstatus) {
		this.lstatus = lstatus;
	}

	public LocationInfo(int lid, String sname, String laddr, int lstatus) {
		super();
		this.lid = lid;
		this.sname = sname;
		this.laddr = laddr;
		this.lstatus = lstatus;
	}

	public LocationInfo() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((laddr == null) ? 0 : laddr.hashCode());
		result = prime * result + lid;
		result = prime * result + lstatus;
		result = prime * result + ((sname == null) ? 0 : sname.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LocationInfo other = (LocationInfo) obj;
		if (laddr == null) {
			if (other.laddr != null)
				return false;
		} else if (!laddr.equals(other.laddr))
			return false;
		if (lid != other.lid)
			return false;
		if (lstatus != other.lstatus)
			return false;
		if (sname == null) {
			if (other.sname != null)
				return false;
		} else if (!sname.equals(other.sname))
			return false;
		return true;
	}
}
